package utils;

import com.mchange.v2.c3p0.ComboPooledDataSource;

import javax.sql.DataSource;
import java.sql.Connection;
import java.sql.SQLException;

/**
 * Created by 郭浩 on 2020/9/23 16:10
 */
public class C3p0Utils {
    private static DataSource dataSource;

    static {
        dataSource = new ComboPooledDataSource();
    }

    public static Connection getConnection() throws SQLException {
        return dataSource.getConnection();
    }
}
